﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="BMNewsListControl.ascx.cs" Inherits="Controls_NewListControl" %>
<%@ Import Namespace="Expo.Training.BRule" %>

<div class="l  col-xs-12 col-md-6 col-lg-6" style="height:250px;">
    <div class="news_picture">
        <div class="clearfix">
            <div class="news_d1 l" style="width:100%;">
                <div class="mygallery">
                    <div class="slide-pic" style="width:403px">
                        <ul  class="slide-viewport">
                            <asp:Repeater ID="rptPicNews" runat="server">
                                <ItemTemplate>
                                    <li style="z-index:2;">
                                            <a href="/Portal/XB/News/Detail.aspx?id=103&nid=<%# Eval("NID") %>">
                                                <img src="<%# GetNewsImage(Eval("PortalImageUrl").ToString()) %>" alt=""/>
                                            </a>
                                        </li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="col-xs-12 col-md-6 col-lg-6" style="float: right;width: 390px;">
   <%--新闻--%>
      <div class="tab_list">
                   <ul id="NewsType" class="clearfix Sub_menu">
                      <li id="li1" class="l current">
                       <img src="img/news.png">
                      </li>
                    
          </ul>
        </div>
        <div id="NewsListControl_News" class="lists" style="display: block;border:none;">
            <ul class="articles_in">
                <asp:Repeater ID="rptNews_List" runat="server">
                    <ItemTemplate>
                        <li><a href="/Portal/XB/News/Detail.aspx?id=1&nid=<%# Eval("NID") %>" title="<%#Eval("Title") %>">
                            <%# PublicFunction.SubString(Eval("Title").ToString().Replace("&nbsp;", "").Replace("<br>", ""),38,true)%>
                        </a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
        <%--公告--%>
     <div id="NewsListControl_Notice" class="lists" style="display: none">
            <ul class="articles_in">
                <asp:Repeater ID="rpt_NewList_nv1" runat="server">
                    <ItemTemplate>
                        <li><a href="/Portal/XB/News/Detail.aspx?id=11&nid=<%# Eval("NID") %>" title="<%#Eval("Title") %>">
                            <%# PublicFunction.SubString(Eval("Title").ToString().Replace("&nbsp;", "").Replace("<br>", ""),38,true)%>
                        </a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
        <%--专题--%>
     <div id="NewsListControl_Temp" class="lists" style="display: none">
            <ul class="articles_in">
                <asp:Repeater ID="rpt_NewsList_n" runat="server">
                    <ItemTemplate>
                        <li><a href="/Portal/XB/News/SpecialTopicDetail.aspx?id=33&nid=<%# Eval("NID") %>" title="<%#Eval("Title") %>">
                            <%# PublicFunction.SubString(Eval("Title").ToString().Replace("&nbsp;", "").Replace("<br>", ""),38,true)%>
                        </a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>

</div>

<script type="text/javascript">
    //隐藏所有菜单
    function hide() {
        $("#NewsListControl_News").hide();
        $("#NewsListControl_Notice").hide();
        $("#NewsListControl_Temp").hide();
    }

    //统一设置样式
    function SetClass() {
        $("#NewsType li").each(function() {
            var Name = "";
            Name = this.id;
            //alert(Name);
            $("#" + Name).removeClass("current");
            $("#" + Name).addClass("current_B");
        });

    }

    $(function() {
        //Add By Yinqi 2014-05-15
        //控制菜单显示隐藏
        $("a").mouseover(function() {
            //alert(this.id);
            //隐藏所有菜单
            //hide();
            //统一设置样式
            //SetClass();
            switch (this.id) {
                case "a1": hide(); SetClass();
                    $("#NewsListControl_News").show();
                    $("#li1").removeClass("current_B"); $("#li1").addClass("current");
                    $("#moreA").attr("href", "News/list.aspx?id=1");
                    break;
//                case "a2": hide(); SetClass();
//                    $("#NewsListControl_Notice").show();
//                    $("#li2").removeClass("current_B"); $("#li2").addClass("current");
//                    $("#moreA").attr("href", "News/list.aspx?id=11");
//                    break;
//                case "a3": hide(); SetClass();
//                    $("#NewsListControl_Temp").show();
//                    $("#li3").removeClass("current_B"); $("#li3").addClass("current");
//                    $("#moreA").attr("href", "News/list.aspx?id=33");
                    break;
                default:
                    break;

            }
        });

    });
</script>

